<?php
include "connect.php";

	$bdd = new PDO('mysql:host='.$server.';dbname='.$database, $username, $password);
	$bdd1 = new PDO('mysql:host='.$server.';dbname='.$database, $username, $password);

	require_once ("../../_livreur_affecter_auto.class.php");
						$aut= livreur_affecter_auto::liste_automobiles_affecter();

$sel = $_POST['sel']
						
						?>
						<div id="test">
						<br />

				<h2>Fournisseur </h2>
			
				
				<ul>
				<?php 
				
				
				$q1 = mysql_query("select fournisseur from gestion_livraison where livreur='".$sel."' ");
				$locat1 = mysql_fetch_array($q1);
				$fourns = $locat1['fournisseur'];
		

				?>

					<li><a href="#"  target="_self"><?php echo $fourns;?></a></li>
				
					
				</ul>
				</div>
				
				<div id="test">
				<h2>Client  </h2>
				
				<ul>
				<?php 
				
				
				$q2 = mysql_query("select nom_client,adresse from gestion_livraison where livreur='".$sel."' ");
				$locat2 = mysql_fetch_array($q2);
				$clt = $locat2['nom_client'];
				$ads = $locat2['adresse'];

				
				$q3 = mysql_query("select latitude,longitude from adresses_clients where name='".$clt."' AND description='".$ads."' ");
				$locat3 = mysql_fetch_array($q3);
				$lat = $locat3['latitude'];
				$long = $locat3['longitude'];
				
				$q4 = mysql_query("select tel1 from coordonnees where ref_contact=(SELECT ref_contact from annuaire where nom='".$clt."') ");
				$locat4 = mysql_fetch_array($q4);
				$telc = $locat4['tel1'];
				
				

				?>

					<li><a href="#"  
					rel="<?php echo $lat ?>,<?php echo $long ?>, 
					<strong></strong><br />

					<strong>Adresse		: </strong><?php echo $ads ?><br />
					<strong>Coordonnees	: </strong><?php echo $lat.'  '.$long ?><br />
					<strong>Phone		: </strong><?php echo $telc ?><br />
					<br />
					<strong><?php echo "<form action='http://localhost/LMB/profil_collab/click-to-call.php?callerid=2000' method='POST' TARGET='_blank'><input type='image' src='appeler.png' value='Appeler'/></form>" ?>
					</strong><?php echo "<form action='http://localhost/LMB/profil_collab/click-to-call.php?callerid=2000' method='POST' TARGET='_blank'><input type='image' src='raccrocher.png' value='Appeler'/></form>" ?>
					<br />
					" target="_self"><?php echo $clt.' - '.$ads;?></a></li>
								
				</ul>
				</div>
				<br />
				<br />
				<div id="test"> !!! Cliquer les liens pour localiser</div>
